package helloworld.admin.assembler.center;

import java.lang.reflect.InvocationTargetException;

import org.apache.commons.beanutils.BeanUtils;

import helloworld.admin.bean.CenterAdminBean;
import helloworld.admin.form.center.CenterForm;

public class CenterFormAssembler
{
	
	private CenterFormAssembler() { }

	public static final CenterForm createCenterForm(CenterAdminBean centerDetail)
	{
		CenterForm form = new CenterForm();
		try
		{
			BeanUtils.copyProperties(form, centerDetail);
			//BeanUtils.copyProperties(form.getAddress(), centerDetail.getAddress());
		}
		catch (InvocationTargetException ite)
		{
			ite.printStackTrace();	//do nothing for now
		}
		catch (IllegalAccessException iae)
		{
			iae.printStackTrace();	//do nothing for now
		}
		return form;		
	}
}